<template>
	<view class="card-item">
		<image :src="`/static/${imgName}.png`" alt="" class="img"></image>
		<view :class="rows == 1 ? 'one' : ''">
			<view class="text">{{text}}:</view>
			<view class="num">{{num}}</view>
		</view>
	</view>
</template>

<script setup>
const props = defineProps({
	imgName: String, 
	text: String, 
	num: [Number,String], 
	rows: {type: Number, default: 1},
})
// const getUrl = (imgName) => {
// 	return new URL(`../../static/${imgName}.png`, import.meta.url).href
// }
</script>

<style lang="scss" scoped>
.card-item {
	display: flex;
	align-items: center;
}
.one {
	display: flex;
	align-items: center;
}
.img {
	width: 79rpx;
	height: 79rpx;
}
.text {
	font-size: 28rpx;
	font-family: Source Han Sans CN;
	font-weight: 400;
	color: #1B1D20;
	margin-left: 18rpx;
	width: 150rpx;
}
.num {
	font-size: 28rpx;
	font-family: Source Han Sans CN;
	font-weight: bold;
	color: #455BDF;
	margin-left: 10rpx;
}
</style>